#ifndef LOCATIONVIEW_H
#define LOCATIONVIEW_H

#include <common/baseeditor.h>
#include <element/userprofile.h>
#include "m_fhs.h"

namespace Ui {
class LocationView;
}

class LocationView : public BaseEditor
{
    Q_OBJECT

public:
    explicit LocationView(QWidget *parent = 0);
    ~LocationView();

    void updateView();
    void generateMenu();
    void openLocation(const QString &location);

private slots:
    void on_systemView_doubleClicked(const QModelIndex &index);
    void on_userView_doubleClicked(const QModelIndex &index);

private:
    Ui::LocationView *ui;

    QString homeLocation;
    QSqlTableModel *userModel;
    QSqlTableModel *systemModel;
};

#endif // LOCATIONVIEW_H
